package cn.highset.modules.base.entity;

import cn.highset.base.HighsetBaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author Victor
 */
@Data
@Entity
@Table(name = "t_visit_time")
@TableName("t_visit_time")
@SQLDelete(sql = "update t_visit_time set del_flag= 1 where id =?")
@SQLDeleteAll(sql = "update t_visit_time set del_flag= 1 where id =?")
@Where(clause = "del_flag=0")
@ApiModel(value = "参观时间")
public class VisitTime extends HighsetBaseEntity {

    private static final long serialVersionUID = 1L;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "参观日期")
    private Date visitDate;

    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    @ApiModelProperty(value = "参观时间开始")
    private Date visitTimeStart;

    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    @DateTimeFormat(pattern = "HH:mm")
    @ApiModelProperty(value = "参观时间结束")
    private Date visitTimeEnd;
}
